﻿using System;
using System.ComponentModel;

using Exif.Interfaces;
using Exif.Various;

namespace Exif.Jpeg.Base
{
	///<summary>
	///
	///</summary>
	[TypeDescriptionProvider(typeof(ExpandableTDP))]
	[ReadOnly(true)]
	public abstract class SegmentBase
	{
		#region Частные поля класса

		private readonly int _offset;

		private readonly IImageProvider _parent;

		#endregion

		#region Конструктор

		///<summary>
		///
		///</summary>
		///<param name="parent"></param>
		///<param name="offset"></param>
		protected SegmentBase(IImageProvider parent, int offset)
		{
			this._offset = offset;
			this._parent = parent;
		}

		#endregion

		#region Открытые свойства класса

		///<summary>
		///
		///</summary>
		public IImageProvider Parent
		{
			get { return this._parent; }
		}

		///<summary>
		///
		///</summary>
		public int Offset
		{
			get { return this._offset; }
		}

		#endregion
	}
}